<template>
  <van-nav-bar title="首页" fixed />
  <!-- 搜索 -->
  <sou style="margin-top: 40px"></sou>
  <!-- 轮播图 -->
  <lun></lun>
  <!-- 宫格 -->
  <van-grid :column-num="4">
    <van-grid-item
      v-for="item in daodata"
      :key="value"
      :icon="item.image_src"
      :text="item.name"
    />
  </van-grid>

  <!-- 楼层 -->
  <div v-for="items in loudata">
    <img :src="items.floor_title.image_src" alt="" width="100%" />
    <div v-for="itemss in items.product_list" style="float: left; margin: 5px">
      <img :src="itemss.image_src" alt="" width="100px" height="100px" />
    </div>
  </div>
</template>

<script setup>
import sou from "@/components/sou.vue";
import lun from "@/components/lun.vue";
import { daohangApi } from "@/api/api";
import { ref } from "vue";
let daodata = ref([]);
daohangApi().then((res) => {
  daodata.value = res.data.message;
});


import { loucengApi } from "@/api/api";
let loudata = ref([]);
loucengApi().then((res) => {
  loudata.value = res.data.message;
});
</script>

<style lang="scss" scoped>
</style>